package com.stefan.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;
@Document(collection = "product")
public class Product {
    @Id
    private Integer productId;
    @Field("product_name")
    private String name;
    @Field("subscription_price")
    private double price;
    @Field("currency")
    private String currency;
    @Field("open_date")
    private Date openDate;
    public Product(Integer productId, String name, double price, String currency, Date openDate) {
        this.productId = productId;
        this.name = name;
        this.price = price;
        this.currency = currency;
        this.openDate = openDate;
    }
    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public Date getOpenDate() {
        return openDate;
    }

    public void setOpenDate(Date openDate) {
        this.openDate = openDate;
    }
    @Override
    public String toString() {
        return "Product{" +
                "productId=" + productId +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", currency='" + currency + '\'' +
                ", openDate=" + openDate +
                '}';
    }
}
